package com.carl.generate.util;

import java.util.List;

public class Page {
	private int pageTotal;
	private int firstResult;
	public int pageSize=2;
	private int pageCount=0;
	List data;
	public int getPageTotal() {
		return pageTotal;
	}
	public void setPageTotal(int pageTotal) {
		this.pageTotal = pageTotal;
	}
	public List getData() {
		return data;
	}
	public void setData(List data) {
		this.data = data;
	}
	public int getFirstResult() {
		return firstResult;
	}
	public void setFirstResult(int firstResult) {
		this.firstResult = firstResult;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getPageCount() {
		return pageCount;
	}
	public void setPageCount(int pageTotal) {
		if(pageTotal%this.getPageSize()==0){
			this.pageCount=pageTotal/this.getPageSize()-1;
		}else{
			this.pageCount=pageTotal/this.getPageSize();
		}
		System.out.println("pageSize:"+this.getPageSize());
	}
	
}
